

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" href="/img/favicon.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Fly542">
  <meta name="keywords" content="">
  
    <meta name="description" content="awk内建变量12345678910$0 当前记录（这个变量中存放着整个行的内容）$1~$n 当前记录的第n个字段，字段间由FS分隔FS 输入字段分隔符 默认是空格或TabNF 当前记录中的字段个数，就是有多少列 ,$(NF-n)为倒数第n个字段NR 已经读出的记录数，就是行号，从1开始，如果有多个文件话，这个值也是不断累加中。FNR 当前记录数，与NR不同的是，这个值会是各个文件自己的行号RS">
<meta property="og:type" content="article">
<meta property="og:title" content="awk常用方法">
<meta property="og:url" content="http://fly542.cn/2020/07/30/03%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91/03linux/02awk%E5%B8%B8%E7%94%A8%E6%96%B9%E6%B3%95/index.html">
<meta property="og:site_name" content="Fly542 技术沉淀">
<meta property="og:description" content="awk内建变量12345678910$0 当前记录（这个变量中存放着整个行的内容）$1~$n 当前记录的第n个字段，字段间由FS分隔FS 输入字段分隔符 默认是空格或TabNF 当前记录中的字段个数，就是有多少列 ,$(NF-n)为倒数第n个字段NR 已经读出的记录数，就是行号，从1开始，如果有多个文件话，这个值也是不断累加中。FNR 当前记录数，与NR不同的是，这个值会是各个文件自己的行号RS">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-07-30T07:09:10.000Z">
<meta property="article:modified_time" content="2024-10-17T09:40:35.676Z">
<meta property="article:author" content="Fly542">
<meta property="article:tag" content="linux">
<meta property="article:tag" content="shell">
<meta property="article:tag" content="awk">
<meta name="twitter:card" content="summary_large_image">
  
  
  <title>awk常用方法 - Fly542 技术沉淀</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4/github-markdown.min.css" />
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hint.css@2/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css" />
  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"fly542.cn","root":"/","version":"1.8.14","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 6.0.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>Fly542 技术沉淀</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('/img/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="awk常用方法">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2020-07-30 15:09" pubdate>
        2020年7月30日 下午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      3.3k 字
    </span>
  

  
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      28 分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">awk常用方法</h1>
            
            <div class="markdown-body">
              <h2 id="awk内建变量"><a href="#awk内建变量" class="headerlink" title="awk内建变量"></a>awk内建变量</h2><figure class="highlight gams"><table><tr><td class="gutter"><div class="code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></div></td><td class="code"><pre><code class="hljs gams"><span class="hljs-meta"><span class="hljs-meta-keyword">$0</span> 当前记录（这个变量中存放着整个行的内容）</span><br><span class="hljs-meta"><span class="hljs-meta-keyword">$1</span>~$n 当前记录的第n个字段，字段间由FS分隔</span><br>FS 输入字段分隔符 默认是空格或Tab<br>NF 当前记录中的字段个数，就是有多少列 ,<span class="hljs-symbol">$</span>(NF-n)为倒数第n个字段<br>NR 已经读出的记录数，就是行号，从<span class="hljs-number">1</span>开始，如果有多个文件话，这个值也是不断累加中。<br>FNR 当前记录数，与NR不同的是，这个值会是各个文件自己的行号<br>RS 输入的记录分隔符， 默认为换行符<br>OFS 输出字段分隔符， 默认也是空格<br>ORS 输出的记录分隔符，默认为换行符<br>FILENAME 当前输入文件的名字<br></code></pre></td></tr></table></figure>

<h2 id="BEGIN-EDN语法"><a href="#BEGIN-EDN语法" class="headerlink" title="BEGIN EDN语法"></a>BEGIN EDN语法</h2><ul>
<li>BEGIN{ 这里面放的是执行前的语句 }</li>
<li>{这里面放的是处理每一行时要执行的语句}</li>
<li>END {这里面放的是处理完所有的行后要执行的语句 }<br>示例如下:<figure class="highlight perl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><code class="hljs perl"><span class="hljs-comment">#运行前</span><br>BEGIN &#123;<br>	math = <span class="hljs-number">0</span><br>	english = <span class="hljs-number">0</span><br>	computer = <span class="hljs-number">0</span><br>	<span class="hljs-keyword">printf</span><span class="hljs-string">&quot;NAME    NO.   MATH  ENGLISH  COMPUTER   TOTAL\n&quot;</span>    <span class="hljs-keyword">printf</span><span class="hljs-string">&quot;---------------------------------------------\n&quot;</span><br>&#125;<br><span class="hljs-comment">#运行中</span><br>&#123;<br>	math+=$3<br>	english+=$4<br>	computer+=$5<br>	<span class="hljs-keyword">printf</span><span class="hljs-string">&quot;%-6s %-6s %4d %8d %8d %8d\n&quot;</span>, $1, $2, $3,$4,$5, $3+$4+$5<br>&#125;<br><span class="hljs-comment">#运行后</span><br>END &#123;<br>	<span class="hljs-keyword">printf</span><span class="hljs-string">&quot;---------------------------------------------\n&quot;</span><br>	<span class="hljs-keyword">printf</span><span class="hljs-string">&quot;  TOTAL:%10d %8d %8d \n&quot;</span>, math, english, computer<br>	<span class="hljs-keyword">printf</span><span class="hljs-string">&quot;AVERAGE:%10.2f %8.2f %8.2f\n&quot;</span>, math/NR, english/NR, computer/NR<br>&#125;<br></code></pre></td></tr></table></figure></li>
</ul>
<h2 id="常用功能"><a href="#常用功能" class="headerlink" title="常用功能"></a>常用功能</h2><h4 id="求和"><a href="#求和" class="headerlink" title="求和"></a>求和</h4><p><code>cat data|awk &#39;&#123;sum+=$1&#125; END &#123;print &quot;Sum = &quot;, sum&#125;&#39;</code></p>
<h4 id="求平均"><a href="#求平均" class="headerlink" title="求平均"></a>求平均</h4><p><code>cat data|awk &#39;&#123;sum+=$1&#125; END &#123;print &quot;Average = &quot;, sum/NR&#125;&#39;</code></p>
<h4 id="求最大值"><a href="#求最大值" class="headerlink" title="求最大值"></a>求最大值</h4><p><code>cat data|awk &#39;BEGIN &#123;max = 0&#125; &#123;if ($1&gt;max) max=$1 fi&#125; END &#123;print &quot;Max=&quot;, max&#125;&#39;</code></p>
<h4 id="求最小值（min的初始值设置一个超大数即可）"><a href="#求最小值（min的初始值设置一个超大数即可）" class="headerlink" title="求最小值（min的初始值设置一个超大数即可）"></a>求最小值（min的初始值设置一个超大数即可）</h4><p><code>awk &#39;BEGIN &#123;min = 1999999&#125; &#123;if ($1&lt;min) min=$1 fi&#125; END &#123;print &quot;Min=&quot;, min&#125;&#39;</code></p>
<h4 id="求访问次数的Top-10-Resource，可以根据此进行优化"><a href="#求访问次数的Top-10-Resource，可以根据此进行优化" class="headerlink" title="求访问次数的Top 10 Resource，可以根据此进行优化"></a>求访问次数的Top 10 Resource，可以根据此进行优化</h4><p><code>cat output/logs/cookie_logs/</code>date +%u<code>/cookie_log|grep -v &#39;172.16&#39;|grep -v &#39;127.0.0.1&#39; |awk -F&#39; &#39;  &#39;&#123; if(index($1,&quot;219.141.246&quot;)!=0) print $2; else print $1  &#125; &#39;|sort|uniq -c|sort -n |tail -n 10</code></p>
<h4 id="求最大最小值"><a href="#求最大最小值" class="headerlink" title="求最大最小值"></a>求最大最小值</h4><p><code>cat 1.log | awk &#39;BEGIN &#123;max=0; min=1000&#125; &#123;sum +=$9; num +=1; if($9&gt;max) max=$9 fi; if($9&lt;min) min=$9 fi;&#125; END &#123;print &quot;avg=&quot;,sum/num, &quot;\nmax=&quot;,max, &quot;\nmin=&quot;, min&#125;&#39;</code></p>
<h4 id="awk中执行shell命令"><a href="#awk中执行shell命令" class="headerlink" title="awk中执行shell命令"></a>awk中执行shell命令</h4><figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs stata">awk &#x27;&#123;cmd=<span class="hljs-string">&quot;rm &quot;</span><span class="hljs-variable">$0</span>;system(cmd)&#125;&#x27; filename ----OK<br>下面的也ok<br>awk &#x27;&#123;cmd=<span class="hljs-string">&quot;rm &quot;</span><span class="hljs-variable">$0</span>;cmd|getline &#125;&#x27; filename ---- OK<br><span class="hljs-keyword">man</span> awk里面关于getline的说明，大意是说 运行command，同时会把输出存在<span class="hljs-variable">$0</span> 里面，或参数<span class="hljs-keyword">var</span>中。<br><br>command | getline [<span class="hljs-keyword">var</span>]<br><span class="hljs-keyword">Run</span> command piping the output either into <span class="hljs-variable">$0</span> or <span class="hljs-keyword">var</span>, <span class="hljs-keyword">as</span> above.<br>command |&amp; getline [<span class="hljs-keyword">var</span>]<br><span class="hljs-keyword">Run</span> command <span class="hljs-keyword">as</span> a co-process piping the output either into <span class="hljs-variable">$0</span> or <span class="hljs-keyword">var</span>, <span class="hljs-keyword">as</span> above.<br>Co-processes are a gawk extension.<br>ps -ef |grep CipRouter | grep -v <span class="hljs-string">&quot;grep&quot;</span> | awk -F&#x27; &#x27; &#x27;&#123;cmd=<span class="hljs-string">&quot;ls /proc/&quot;</span><span class="hljs-variable">$2</span><span class="hljs-string">&quot;/fd/ | wc -l &quot;</span>;system(cmd); &#125;&#x27;|awk &#x27;&#123;num+=<span class="hljs-variable">$1&#125;</span> END &#123;<span class="hljs-keyword">print</span> <span class="hljs-string">&quot;sum= &quot;</span>,num&#125;&#x27;<br>或者<br>ps -ef |grep CipRouter | grep -v <span class="hljs-string">&quot;grep&quot;</span> | awk -F&#x27; &#x27; &#x27;&#123;cmd=<span class="hljs-string">&quot;ls /proc/&quot;</span><span class="hljs-variable">$2</span><span class="hljs-string">&quot;/fd/ | wc -l &quot;</span>;cmd|getline; <span class="hljs-keyword">sum</span>+=<span class="hljs-variable">$0</span>;&#125; END &#123;<span class="hljs-keyword">print</span> <span class="hljs-keyword">sum</span>&#125;&#x27; <br></code></pre></td></tr></table></figure>

<h4 id="awk-多个进程号转为数组"><a href="#awk-多个进程号转为数组" class="headerlink" title="awk 多个进程号转为数组"></a>awk 多个进程号转为数组</h4><p><code>aaa=(</code>ps -ef |grep xxx |grep -v grep |awk ‘{print $2}’<code>) echo &quot;$&#123;aaa[@]&#125;&quot;</code></p>
<h4 id="awk-F-特殊字符"><a href="#awk-F-特殊字符" class="headerlink" title="awk -F 特殊字符"></a>awk -F 特殊字符</h4><p><code>,\&quot;dn\&quot;:\&quot;baiducdnct.inter.xx.com\&quot;   以&quot;dn\&quot;:\来分割，因为\为特殊字符，所以需要转义，每4个\为一个过滤\ awk -F&#39;dn\\\\&quot;:\\\\&#39; &#39;&#123;print $2&#125;&#39; </code></p>
<h4 id="awk-打印从某一列到最后一列的内容"><a href="#awk-打印从某一列到最后一列的内容" class="headerlink" title="awk 打印从某一列到最后一列的内容"></a>awk 打印从某一列到最后一列的内容</h4><p><code>awk -F &quot; &quot; &#39;&#123;for (i=2;i&lt;=NF;i++)printf(&quot;%s &quot;, $i);print &quot;&quot;&#125;&#39;</code></p>
<h4 id="清理除第一行和最后一行的的bash进程"><a href="#清理除第一行和最后一行的的bash进程" class="headerlink" title="清理除第一行和最后一行的的bash进程"></a>清理除第一行和最后一行的的bash进程</h4><figure class="highlight perl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs perl"><span class="hljs-comment"># awk 命令将第一行和最后一行给去掉了, NR&gt;2&#123;&#125;&#123;&#125; 的理解为当前行大于2时打印p的当前值并将当前行的$2赋值给p, 否则只将当前行的$2给p  , 不能使用$p</span><br><span class="hljs-comment"># xargs -r 其中-r参数为当xargs 参数为空是不执行任何命令</span><br>ps -ef --<span class="hljs-keyword">sort</span> start_time |<span class="hljs-keyword">grep</span> bash |<span class="hljs-keyword">grep</span> -v <span class="hljs-string">&quot;grep&quot;</span> |awk  <span class="hljs-string">&#x27;NR&gt;2&#123;printf p&quot; &quot;&#125;&#123;p=$2&#125;&#x27;</span>  |xargs -r <span class="hljs-keyword">kill</span> -<span class="hljs-number">9</span><br></code></pre></td></tr></table></figure>
            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91/">软件开发</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/linux/">linux</a>
                    
                      <a class="hover-with-bg" href="/tags/shell/">shell</a>
                    
                      <a class="hover-with-bg" href="/tags/awk/">awk</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2020/07/30/06%E6%9D%82%E9%A1%B9/01hexo%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">hexo使用方法</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2020/07/30/04DevOps/03vimrc%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/">
                        <span class="hidden-mobile">vimrc配置文件</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  

  

  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  <script  src="/js/local-search.js" ></script>



  
    <script  src="/js/img-lazyload.js" ></script>
  



  



  
    <script  src="https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4/anchor.min.js" ></script>
  
  
    <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js" ></script>
  






  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
        typing(title);
      
    })(window, document);
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>


</body>
</html>
